package com.ambimmort.shj.action.policy;

import com.ambimmort.shj.service.policy.PolicyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Josh on 2015/7/30.
 */
@Controller("/action/policy/get.do")
public class Get {
    @Autowired
    private PolicyService policyService;

    /**
     *
     * @param request
     * @param type
     * @param instance
     * @param messageNo
     * @return
     */
    @RequestMapping("/action/policy/get.do")
    @ResponseBody
    public String get_policy(HttpServletRequest request, @RequestParam("type") String type,@RequestParam("instance") String instance,@RequestParam("messageNo") String messageNo)  {
     return   policyService.get(type, instance, messageNo);
    }
}
